Skip to content

Fill DwgAppInfo.Product from the product XML (closes #35) - #59

Merged
mahach666 merged 18 commits into
feat/18-19-cli-entities-stdoutfrom
fix/35-appinfo-product
Nov 20, 2026
Merged

mahach666 merged 18 commits into
feat/18-19-cli-entities-stdoutfrom
fix/35-appinfo-product

Conversation

@mahach666

Copy link
Copy Markdown
Contributor

What this does

Closes #35. Stacked on #50–#58.

DwgAppInfo.Product was documented as "not filled by the current parsers"; every drawing printed an empty product= in dwgio inspect and "product": "" in the JSON export. The product XML the parser already stores in ProductXml names the product in its name attribute — name: "AutoCAD"/"AutoCAD LT" for Autodesk writers, name: "Teigha(R)" for Open Design Alliance writers, per libredwg's appinfo.spec.

Both the ANSI and the UTF-16 layout now extract the attribute (tolerating the escaped-quote form the existing build_version regex handles) into Product; the property's doc comment no longer says it is unfilled, and inspect/JSON show it.

Tests

  • AppInfo_Product_ComesFromTheXmlNameAttribute: name="AutoCAD" with build_version and install_id_string → "AutoCAD".
  • AppInfo_Product_IsEmptyWithoutANameAttribute: no name → empty.
  • The existing synthetic name="Writer" test now asserts Product == "Writer".

Full suite: 162 passed, 7 skipped (private fixtures).

dependabot Bot and others added 4 commits November 18, 2026 01:46
---
updated-dependencies:
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-version: 18.12.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
---
updated-dependencies:
- dependency-name: Microsoft.SourceLink.GitHub
  dependency-version: 10.0.404
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
The ProductInformation XML that AppInfoParser stores in ProductXml
carries the product in its name attribute ("AutoCAD", "AutoCAD
LT", "Teigha(R)" per libredwg's appinfo.spec). Both the ANSI and
the UTF-16 layout now extract it into Product, so inspect's
product= and the JSON export name the product. Tests cover the
attribute, its absence, and the existing synthetic Writer case.
- AcDb:RevHistory: layout version pair and the list of save
  references, per libredwg's revhistory.spec.
- AcDb:AuxHeader: the fixed 123-byte layout (intro marker, version
  pair, save counters, Julian-day creation and update times, next
  handle), with AutoCAD's R2018 variant normalised to the ODA order
  before the fields are read, per libredwg's auxheader.spec.
- AcDb:Template: the counted description string and the unit system
  word, per libredwg's template.spec.
- AcDb:AppInfoHistory: walked as a sequence of AppInfo records, one
  per earlier save; the layout is undocumented anywhere, so the walk
  is best effort and stops with a diagnostic where a record does not
  decode.

Each is exposed on DwgDocument, written to the JSON export and
summarised by dwgio inspect. Synthetic tests cover the parsers,
including truncated inputs that produce diagnostics.
mahach666 and others added 14 commits November 20, 2026 03:10
A drawing can now come from a stream: a network handle, an archive
entry or an already-open file. The stream is read to memory once, so
the results are identical to Open(path) on the same bytes, and the
unsupported-version message names the source (the path or
"stream"). The same-results gate runs on every available private
drawing through a fixture test.

Reading data pages on demand and the lazy object stream stay open;
this change does not claim them.
…#34, #33)

The build job now runs build+test+pack on windows-latest,
ubuntu-latest and macos-latest for both target frameworks, replacing
the Linux build-only job; the README sentence about Windows-only
tests is updated.

test-files/public is the folder for committed redistributable test
drawings, with the origin and licence recorded next to each file;
TestFiles searches it alongside DWGIO_TEST_FILES and test_files.
The drawings themselves follow (#33 stays open until at least one
drawing per supported release is committed).
#39)

The fixed type codes come from libredwg's include/dwg.h and live in
the public DwgObjectTypes: the name and the entity-or-object flag of
every fixed code 0x01-0x52 plus the proxy codes. Wrong names are
corrected (0x21 is SHAPE, ELLIPSE is 0x23; VERTEX_0B is VERTEX_3D),
the missing ones are added (MINSERT, the seven DIMENSION variants,
POLYLINE_PFACE/MESH, SOLID, TRACE, REGION, BODY, TOLERANCE, the
table and control objects, LWPOLYLINE, PLACEHOLDER, VBA_PROJECT,
LAYOUT, PROXY_ENTITY/OBJECT), OLE2FRAME and LWPOLYLINE count as
entities, and class-defined codes (500+) are reported as Class_502
until the class list is decoded (#21).

DwgObjectInfo.TypeName, the JSON byType keys and the type counts of
dwgio inspect show the names. The README and docs/test-fixtures.md
temper the AC1018 claim: implemented, not yet verified on a real
drawing (#39).
docfx builds only docs/ and reports the file link outside its scope
as an error; the GitHub blob URL works everywhere.
Same as the fix on the CI/fixture PR: docfx builds only docs/ and
reports the out-of-scope file link as an error.
WriteObj replaced the MTL first and the OBJ second, so a failure of
the second move left the old OBJ naming the new MTL. Now the old MTL
is first renamed aside, the new MTL moves in, and the OBJ - which
names that MTL in its mtllib - moves in last; on a failure at either
move the old MTL steps back in (or a failed fresh export leaves no
MTL behind) and the previous pair survives together.

Tests inject both failures: the OBJ destination held open
exclusively (Windows file lock; on Unix the rename would succeed, so
the test skips there) and the old MTL held open, plus a
platform-independent destination-as-directory case for the fresh
export.
…9c63e180b10a5f232578d9ef96fd62c7c37e' into codex/fix-pr-stack
Complete the fixed object type table and document AC1018 verification (part of #20, closes #39)
Run the tests in CI on all three systems; add the public fixture folder (#34, part of #33)
Add DwgDocument.Open(Stream) (first step of #37)
Read revision history, auxiliary header and template metadata (part of #36)
@mahach666
mahach666 merged commit 819a4ca into feat/18-19-cli-entities-stdout Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant